package aim;

import java.io.IOException;

/**
 * AIM.java
 * 
 * This is the main class that invokes the AIM program
 * 
 * @author Andrew Bernard, Zachary M. Allen
 */
public class AIM {

  /**
   * Main method runs program
   * @param    args    Command line arguments
   */
  public static void main(String[] args) {
    try {
      Options options = new Options(args);
      AIMIndex index = new AIMIndex(options);
      index.write();
    }
    catch (IOException e) {
      e.printStackTrace();
      Constants.errorOccurred("Error processing file");
    }
    catch (Throwable T) {
      T.printStackTrace();
      Constants.errorOccurred("Program terminated unexpectedly");
    }
  }
}